/*
 * Documento.java
 *
 * Created on February 10, 2009, 12:29 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package kernel;

/**
 *
 * @author alvaro
 */
public class Documento extends QuickSortElement {
    
    private int value;
    private String name;
    /** Creates a new instance of Documento */
    public Documento(int value, String name) {
        this.value = value;
        this.name = name;
    }
   
    public String toString(){
        return "[doc (value: "+value+")] "+name;
    }
    
    public int compareTo(QuickSortElement q){
        //this
        if(this.value > q.getValue())
            return 1;
        if(this.value < q.getValue())
            return -1;
        else return 0;
    }

    public int getValue() {
        return this.value;
    }
}
